// 引入createRouter
import {createRouter,createWebHistory} from 'vue-router'

import Test from '@/view/components/test.vue'
import Index from '@/index.vue'
import Login from '@/view/components/login.vue'
import NotFound from '@/view/404.vue'
import Forget from '@/view/components/forget.vue'
// import App from '@/App.vue'


const routes = [//规则
    {path:'/login',
     name:'登陆',
     component:Login
    },
    {
      path:'/:catchAll(.*)',
      component:NotFound
    },
    // {
    //   path:'/forget',
    //   name:'忘记密码',
    //   component:Forget
    // }
]


// 创建路由器
const router = createRouter({
  history:createWebHistory(),//路由器工作模式
  routes:routes
})

export default router
